package com.example.md.mddemo.tabledemo;

import com.example.md.mddemo.tabledemo.tableroute.DbContextHolder;

import java.io.Serializable;

/**
 * Copyright © 2018年 ziniuxiaozhu. All rights reserved.
 *
 * @Author 临江仙 hzqiuxm@163.com
 * 所有pojo必须继承此bean 才能使用分库分表
 * @Date 2018/9/4 18:15
 */
public class BaseDomain implements Serializable {

    private String tableName;

    public String getTableName() {

        this.tableName = DbContextHolder.getTableIndex();
        return tableName;
    }

    public void setTableIndex(String tableName) {

        this.tableName = tableName;
    }
}
